package cn.jinhe.doc.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.jinhe.doc.base.DaoSupportImpl;
import cn.jinhe.doc.domain.MaterialConsume;
import cn.jinhe.doc.domain.ServiceTopic;
import cn.jinhe.doc.service.MaterialConsumeService;
@Service
@Transactional
@SuppressWarnings("unchecked")
public class MaterialConsumeServiceImpl extends DaoSupportImpl<MaterialConsume> implements MaterialConsumeService{

	@Override
	public List<MaterialConsume> findByServiceTopic(ServiceTopic serviceTopic) {
		// TODO Auto-generated method stub
		return getSession().createQuery(//
				"FROM MaterialConsume m WHERE m.serviceTopic=? ")
				.setParameter(0, serviceTopic)
				.list();
		}
	}
